updated code to conform to python standards