added pinned tab function