replace c asserts with NSAssert