removed detect, added env dir