figure out stdio stuff