modify python snippts