fixes from test3 branch