cleanup to split for linux and darwin