allow date to be passed in