updated encode analysis