added function documentation to readme