Removed duplicate code segment