refactored agreement page