Now works with environment injection