Updated libary concatenation logic