tests, small changes in lib