moved scope start and end date setting into the controller