Made modifications for compass