added id2pos.c