Introdued new funtion in A* that will return the path of searchnodes instead of their actions.