finished placing algorithm