moved function to parent class to avoid multidefintion