Placed common function in parent class so it is inherited amongst the child classes