added code to deal with multiple libraries