some tests and benchmark code