added phpdoc
added debug