Removed duplicated code

Removed useless code