cleanup mainline