work on integer encoder