created update_attribute method