refactor pinning feature to follow common pattern of other features