add active class to the correct tab