finished documentation and updated sample code