added some validation and better keyword filtering/updating