refactored with a real store, dispatcher, actions, flux style.