rewrite for #3. almost there, missing 20 bytes