likely enviroment allocation now uses malloc for consistency