convert struct to pointers