added exception handling for zero
added exception handling for value < 0
added number hash
added output
made it return a string