annotated functionf for splint