still have not tested a thing, but here's a lot of code