converted to db independent