add phpdoc comments about device loop