specify empty environment as nil instead of None