corrected phpdoc warnings; added tests;