adds tests and a lot of stuff