refactored date