Updated dynamic placement code