store pointers in array