Stores data in state