made some experimental changes to incorporate a map