Very interesting story once a man used to serve his old master, day and night. He would make food, bring water from well, massage his master's feet and do all things for his master. Old master used to say, "Why are you wasting your time?"Old master knew that there must be some desire, for which that man is serving him. Master used to ask him what he wants. One day man said, "I am serving you because I want to learn miracle from you, even if it's just one miracle."Old master replied, "But I don't know any miracle. you have unnecessarily wasted your time. you should find someone else, who knows miracle."Man replied, "I have been told that you always deny that you know any miracle but I have seen that you go on continuously performing miracles.I have been told, 'don't listen and go on serving him. one day master will tell you secret but only when he finds you ripe.'perhaps am not ripe yet, not ready for your miracle that's why you are not telling me."Saying this man continued with his work. Few days passed by, old man saw that man was unnecessarily working. One day, old master called him and said, "It seems that you will not leave unless I tell you the secret."Man replied, "Yes. I will not leave without miracle."Old man said, "Ok then I will tell you. here is the mantra using which miracles can be performed.what you have to do is first take bath, change your clothes to fresh clothes, close your door, sit alone and repeat this small mantra and repeat it five time, just five times. then you will be able to do any miracles you want to do."Listening to this man got happy. He took mantra, didn't even show any gratitude and simple rushed down the steps of temple. When man was in middle, old master shouted, "Wait, I have forgotten one thing. while you repeat this mantra remember one thing - don't think of any monkey."Man was puzzled and said, "Why should I think of monkey? I have never thought about it my whole life."Old master smiled and said, "That's ok. just remember that. not to think of monkey at all. if monkey comes in, you have to repeat mantra five times again."Man replied, "But why should monkey come?"Old master said, "I don't know. I just told you secret that has been told to me by my master."Man couldn't even get down stairs before he started thinking about monkeys. He thought to himself, "I haven't even started reciting mantra yet and monkeys are coming."Man reached home, with his mind crowded with monkeys. Wherever he looked he could see only monkey. Man thought, "Master is such an idiot. if he knew that monkey was trouble, he shouldn't have mentioned it. no elephant or lion or any other animal is coming to mind and monkey are not leaving."Man had bath, changed to fresh clothes and sat alone in his room which his eyes closed but it was useless. Monkeys were nudging him, they were all around him. Wherever he looked, he would see monkeys even in face of his wife and father. Man was going mad. Five times was too much, he wasn't even to complete mantra even once without thinking about monkey. By morning he was almost mad. He went back to old master and returned mantra and told him all about he had been thinking about and happening to him since he left. Master said, "What can I do? that monkey comes with the mantra. without the monkey the mantra is useless. unless you can avoid monkeys you cannot perform miracles."Man replied, "Please take your mantra, I don't want it and relieve me of monkeys."Old master said, "Once you have left mantra with me they will not come."Man left and he was surprised that now there were no monkeys. He reached home and everything went back to normal. He felt strange. He took bath and thought, "Although I have returned written mantra but because I tried to chant it yesterday many time, I remember it. there is no harm to try it now. now I can repeat it."Moment he started mantra, monkey started to appear. Just then man dropped the whole idea. If you try to stop a thought, you cannot. On contrary, the very effort to stop it gives it energy, the very effort to avoid it becomes attention. Whenever you want to avoid something, you are paying too much attention to it. If they come, don't feel bad because even slight feeling that it is not good and you have started fighting. There is no need to stop mind. Thoughts are rootless, you need not to be worried about them. You simply watch them. Simply be an impartial watcher, neither for not against. You simply sit inside yourself and look. 
Once you know this then key is in your hand. 