added option for removing duplicate keywords