add while loop
add additional comments and logic to the loops
still much is wrong
add overflow comments and adjust test
add overflow control
test for overflow before calculation