add more tests and sanity checks