some extra python codes