having problems with divide by 0