added comments and examples