Trimmed the code