removed all uses of throw
make code much more robust against all sorts of undefined data