add read ref.stdout in pa5