What to do when a thought comes up while meditating From the meditation podcasts I have heard when a thought comes up acknowledge it by saying "thinking" and then try to gently return back to your breath. 

There is something else I tried experimentally. In this case I was not noticing my breath, but was noticing my thoughts. I did this by asking, "what's the next thought" and tried to observe my thoughts mindfully. Obviously more thoughts arose, but it felt like I was still practicing mindfulness. And it seems easier to do this type of mindfulness while in an environment with a lot of distractions. (Walking, running, etc.)

I wanted to know if it is ok to do this?

Also, are there other methods for handling my thoughts?
It is important to understand what is meant by 'right view' (samma ditti) which covers the origination of thoughts, the causal arising of thoughts, and the non-self nature of thoughts and the entire thinking apparatus.  

This understanding will help one to be mindful of the arising and passing away of thoughts during meditation without identifying with them. The default view that a thought is mine, created by myself naturally causes one to pursue them. While the right view of the true nature of thoughts eventually leads one to be unbounded from thinking.