tweaked code for tabs - now we have 3