script to extract marker positions