Update README.md

added function to main loop