nested reffs ain't working, but I'm very close :D