added some tests and utilities