added a sample code usage, and some minor additions