solve exercise 9: implement "to_snake" method