change Dial func to accept resource parameter