the main function being self testing of the device