add function object to a-star algorithm