added encoding scheme
corrected encoding scheme for HALT