i have a feeling it is a problem with how i am getting the start position (pos) I've spent a week on this and cant figure it out.

Any help is greatly appreciated.
Thanks