set correct state