fixing whitespace issues in density.py