Rewrite of reference selection
Rewrite of reference selection