optimized php and py sweepers