I would really like to have better understanding of how to reset state. All existing examples are poor and don't really explain how to use this method for more complex tasks.