moved validation to the store