made tabs simplier and integrated Alex and Joels code