lots of tests
moved and cleanedup