Finished the addFromCatalog function

It needed to be rearranged to be able to work in different situations