second commit, mostly working