Use more conventional python code