added edgetype histogram - returning really bad results