better manager code (refactor)