Actually working version of platedesign.py