Changed hardcode state parameter with dynamic value