tested under debugger. Unit test works ok