created main loop and print functions