added initializer for compass