completed function to update custom fields vge