added some methods and tests