updated dal for routines and added more validation for dates