['I was so glad that my friend told me something right as I was walking into school.']
Why, what did he tell you?
I was walking into school and my friend suddenly told me that there was a pop quiz in physics. I studied for a while before I went into the class and surely enough there was a quiz, so I was very happy that she told me.