added some density macros