Write substitution, some tests