switched to simpler assert function