refactor getannotations