added some convenience methods and appropriate tests