project setup and refactoring