hash printing function