better check for environment