added manualt db flushing