almost done, some work in tab-1