added improved python syntax