initial proof of concept - super sloppy, but it works