added cleanup phase