debugging numerical issues