refactor some pieces of the project