refactor day1