add functions

1. log the MFE/MAE for analysis
2. allow block selection