state shouldn't be a parameter