added indirect method to matlab