a runable version, still need more debug info.