refactor day change related files