refactoring out old code