remove empty database function