refactor arel query
extract deck and card search context