added resolveDoor function. Added ability to add cost samples using a service in the node