converted RHS to use params struct, finally figured out the pointer situation