add & use assert to remove if statements