fix input and ouput