added the checker for device and improved checking the result