Removed repetition

Removed unnecessary code.