added support for the magnometer