updated documentation to reflect correct API usage, fixed typos