GREEN test 3 - refactor code