simplify shell code