updated to export a function. updated readme