removed divide by zero bug. Can't handle negative numbers.
proper solved