WIP: -j option + added assertions in state.py