fixed input and output boxes in wrong order