rewrite all query using ActiveRecord