changing syntax to be standard python