added filtering and trimming value maps, ak/ca flexibility