adapted to new Arel interface