added better asserts