pin/unpin topic refactoring