finished agreements, added tests