simplified creation of env to exec code in