use pattern ActiveRecord