introduced avatar as active record model