replaced asserts with if()