modified UTAH encoder