moving around code for aesthetics
removed legacy code