Working on maze problem