added comprehensive documentation