refactored the mangers state into its own module