starting to actually resemble coherent code