added support for token config in db