refactor truthshell