resolve problem with empty vocabs, add tests for threshold