#3 refactoring horribly broken for the moment