optimize the out put