update density