added putenv hook