Reimplemented while loop, added break
Testing sum implementation