Added the main function

Created the first version of the main function