add decode imp
cleanup