run the code on individual tabs