repaired Peter idiocy and added some parameters + doc
PHPdoc OK - removed ending php tags