dynamic_pix.py working version