validate function now returns receipt hash as well