updating with proper ref