Moved code from child class to parent