doall code cleaned