Update puthtml function