adding old python code