almost there, next: write out update procedure.