before while as
But after we spent some time together   talking  and laughing, I realized that   [MASK]  I had done that, I would have  lost  a new friend and missed all the fun we would have together.