suggest working only on default.xqy (needs refactoring)