Rewritten centers from scratch. Found a mistake.