replaces deprecated asserts