fixed two way, added an example for it, and tidied up a bit