fixed zero division bug that happened when all given numbers were the same