Maze function with Arguments