still refactoring
better refactoring