cleaned-up paired.sh