chmod
minor refactor