simplify looping structure for annotation