added validation so that start date must be before end date