moved the required clause outside.