hardware test routine