added methods and tests