Modifications have been made to the smoothing and density functions so that something like the following