new way to search db using sql