codewars/refactoring post