refactor queries for annotation page, much faster now