well, close but no cigar ... if the key really doesn't have any subkeys, it still prints a null subkey plus, it prints a null subkey at the end ... need something eloquent like this, but covers all the bases too.