put repo in good state, will write tests soon (who can follow that?!)