request codes for categories almost working but for some reason you have to refresh the browser