added maze algorithm