added update state to records