added function to adjust path coordinates to fit current window size. needs a bit of work yet, but it mostly works