working on dec thread
fixed bug on enc/dec process
code and ui improvement