added sample with subclass