refactor to allow duplicate in/out names. user beware.