better method to construct parent class