redesign of target stdin/out