added tabs, bug fixes