modify as ifmain-like style; add plot