rewrite categories activity