handles categrories correct