save states of the controls
correct render algorithm