removing the hardcoded mn and adding a state parameter