Adding arguments and startTime and endTime