refactoring under haruki_zaemons tuteledge