added actually usefull unit tests. fixes #2