refactoring + added method to get all devices info