returning position matrix