initial commit, with the working stuff, kind of ugly but is a proof of concept