Was he flirting or was he 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?💕

Update:

I was in class today and he kept on talking to me. He asked me to write down the teachers email on a piece of paper and I said I couldn't remember it and he said oh come on(obv joking around) and I was saying well why can't you remember it. He said it wasn't his job so I said it wasn't mine either then he later told me it was right in the paper the teacher had given us. Lol. He kept making small talk and kept asking me questions,just basically trying to talk to me. He then got up a couple times and this third time he came up and hit me with the papers on the top of my head (not hard) I hit him back playfully but a little hard tbh. (I didn't mean to) so a little later he stands there and I start walking and so does he and I feel him kinda push me to the side with his body I'm like Hey! He's smiling and saying I got in the way. Then we kept on walking and he was walking behind me and he said omg get out of the way, and i told him me?,you're the one following me. He didn't say anything after that. Haha, then he walked into my 9th period and was talking to some guy and then saw me and his eyebrows furrowed(if he was trying to be funny)I just looked at him back and raised my eyebrows. But that's all that happened today.