update cat function