add pin function for right side panel