adding simplifycatio of common factors in sum