reviewed stuff up to #write-statement