set up the state machine, added more tests for creating friendships