added a bunch of tests, renamed exported sub ..