added gage mapping, cleaned input for midterm