changed method to validate device