passing subclasses to parent