updated for htlmencode