improved error checking, error throws now require a token as opposed to taking a token that could be null