Removing duplicate element