update: documented the main function to serve as a better example to
newer developers who are using or adding onto the API