add asserts
cleanup