Change lastPos to startPos