completed the main core of the project. Still needs comments