add get_param_r variant (remember to clean this up with nice abstractions)