public static CompanionTypes getCompanion(Companion c){
        try {
        	for (final CompanionTypes dt : values()) {
                if (c.getClass().isInstance(dt.companionType)) {
                    return dt;
                }
            }
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
		return null;
	}