determine relative position