updated maze solver