Re-defined LD code (take into consideration that it might be an array within an array)