fixed phpdoc
main loop in own method