updated some python syntax