lost the latest version of this project, so here is a slightly broken one. but it's all here for archive purposes