added output module to handle output