python code from a year ago