fleshed out WRITE, fixed connection match, indentation