Added extracted code.