Updated division logic.