Moved algorithm to separat catalogs