createSalt refactor #2