add better debug pattern