added tests

I wrote some tests to get a better understanding about what happend. Do you want them?