unix refactor