update samples and tests for multiple ref parameters
Fix references