sub class work and active record work