Changed intvals out for floatval.  Shouldn't need to declare either but better safe than sorry. Still looking into the div/0 #310