improved map calculations