matlab function workign now - numberOfResults returning