added if statement around 'manager' sed lines