algorithm: restructuring projects