refactoring woohoo!