set the right state