edited user search to be database-agnostic;