Added a flag for last iteration cases and included it the case in which noisy/unstable compositions without a pair occur. This was necessary in order to avoid an infinte while loop in llbehComposition