seprated output function