Moved logic to the baseController. Not done