make localize pass object, not just values, and also return it for later use