some fixes
diff --git a/wally/utils.py b/wally/utils.py
index 2011a98..3fba2b0 100644
--- a/wally/utils.py
+++ b/wally/utils.py
@@ -370,3 +370,16 @@
 
     for role, count in sorted(per_role.items()):
         logger.debug("Found {0} nodes with role {1}".format(count, role))
+
+
+def which(program):
+    def is_exe(fpath):
+        return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
+
+    for path in os.environ["PATH"].split(os.pathsep):
+        path = path.strip('"')
+        exe_file = os.path.join(path, program)
+        if is_exe(exe_file):
+            return exe_file
+
+    return None