first commit, seems to be mostly working