add tests, fix bug for id with dots
add phpdoc