changed to use local fields so it can be filtered