Added more code to Python model