added several methods and tests