some refactoring + new methods