some new methods and fix for tests