use state and separate store