replace state when changing hashses