bb t next



Pull request for [bb t next](https://trello.com/c/7b4Z3V8o/1803-bb-t-next).

    
why `~0` instead of `-1`? looks like obfuscated code