refactoring - add a env type to better organise its properties