added ability to use some env flags