Changed computePath to return ArrayList