updated prototype to support duplicating tab