Added ability to input a relation as well as an element.