cleanups
refactor assert