made sure code is correct
doing density plot rather than straight histogram