Determining the course of employment in vicarious liability