refactored everything to move to root