Changed average timespent type to int