Added a method for getting all devices