refactoring of annotationMethods