Correcting for the edge effect in density estimation: Explorations around a new method