replaced 'local' and 'production' functions with 'env?'