Duplicate code

Removed duplicate code from original method.