added update() to state model
updated trigger update logic