more changes to reference handling and when to call variant