refactor ouput bussiness