improve sf scripts