added moveTab function