still refactoring code