use arel instead of plain SQL