remove all asserts and replace with ifs

- Fixes #12