fixed coin toss, some refactoring, delayed user.state.free()