moved the `date` call to a more suitable place