refactor code for annotation etc.