Added methods and unit tests