script works for R13 now (thanks to Yura Izmaylov)