added the tabbed interface. pseudocoded the stats calls.