Worked on main cpp