added notes and updated phpdoc