Implemented Main method