removed duplicate code
removed duplicate code