this version add database support