#25 adding size function to calculate amount of sub-algos