prepare_annotation function

Prepare annotation parameters and positions