annotated implementation using gt and lt