refactorin up down pub unpub