refactor api/integrity
add range functions to lib/when
remove .only
fix comment