fixing transformations while making denisty map