change In/Out accordingly