moved asserts into tests