revise stackdecoder.py using doctest
revise createdb and stackdecoder