Added functionality to tabs