added support for more fields in database