cleanup using inheritance