Adding a main function