revert Hamed's changes to encoding graph