throwing all kinds of exceptions, but functionality seems to be in place