passing array through pointer