2. version, output works