modifed the new devices method to send json