made changes for input type == output format