added more documentation and examples