simplified transitions, added a few tests