added -out flag (and renamed -in flag)