convert find_by_id to where(id: ).first