refactored to use manager