trying some stuff to root out issue with retval pointer