Replaced find_by with where