updating name correctly