started to rewrite php files to py