some python code to brush up