added asn1_write_element utility