Was he flirting or just being nice?

Ok so I was in class and I caught this guy staring at me today.At first I wasn’t sure and tapped my friends back who was in front of me to ask her if he was looking at her. But before she turned around I asked him what he was looking at. He pointed at my direction so I pointed at my friend in the front and he said no, then i pointed at my friend in the back and he said no? Then he pointed at a picture of an old man behind my head. We just laughed a bit about it. Then a couple of minutes I caught him looking at my direction again and he just stared back with no expression. So I nodded my head like saying “hey” he returned it and smiled then pointed at the picture of the man behind me again. I just laughed and waved him off. Then my friend turns around and says, see it’s when he does things like this that I think he’s flirting with you. I just laughed it off and said “no, he’s not”. The three thing she was referring to btw was when we were in groups and he walked up to my group but specifically next to me and started talking to me but I kinda ignored him. So he left and then my friend told me he was flirting with me and I felt extremely bad. But then he came again and gave me the answers to the work we were doing and in return asked me if he could have some answers too from another work we had to do. So I looked at him and said, “ahh so that’s why you gave me the answers” he just smiled and said yeah come on 50/50. I let him copy and that was that. Then he came over again and had a piece of paper trying to throw it into the trashcan. He missed (lol) so I told him to lend it to me and I played along as well as with another friend and that was it.

But now I’m thinking over here lol. I used to like him and had initially felt that he liked me too but I moved on. But now I’m overthinking and I find myself looking at him. What do you girlies think?💕