implemented relations API changes

Closes #84