adding untested code for sampling the shared tuning curve model