beginning refactor (end of class)