add an option to only keep a set of fields