[IMP] improvements in tests
[IMP] fix in code