lib and test setup