-created main function