Wrote Loop()

main function