day09 refactor