refactor salt dir to states