added documentation
removed debugging print out