worked on main method