Edited toConnector method to follow Piazza's implementation. Ref:
https://piazza.com/class/hfe8iekskql22c?cid=221