added documnetation and examples