changed lists to pointers