add logic for exchanges controller