remove pub and unpub