refactored for php and python
first upload