add functionality to process minfico and maxfico
refactor code
update tests
make a couple of code changes