change from disp to fprintf