adapted tests to new usage pattern, fixed code and comments