adding a main function