populate ref fields