functional candidate support filter methods without side effects to work
with immutable scala map