Updated cost and reversed search order