* use idx as matrix index