Added map and logic.