still refactoring and moving code around