Once there was a great yogi who lived in a small town. All day long he did practices like meditation, japa (chanting), puja (ritual worship), asana and pranayama. One day a prostitue moved into the house across the street. All day long men came and went from the house. The yogi would see this out of his window and think, "What is going on over there? This is really horrible. I am yogi. I should not have to live near such an impure, evil woman. This is not good, i do not deserve this."
The prostitute was very busy, but once in a while she would get a break and look out of her window and see the yogi. When she did, her heart filled with love and admiration for him. "Oh, what a wonderful man he is. All day long, he is so holy, thinking of God, worshiping God, oh what a great soul! Look how peaceful he is, his mind always on God."
After some time the prostitue and yogi both died and went up t othe gates of heaven. The angels and saints at the gate looked at the prostitue and said, "Oh, how wonderful to have you, we've been waiting for you! Please come in." They looked at the yogi and said, "You back down you go!" The yogi was very upset and protested: "This is unfair, there must be some mistake. All of my life i have been meditating and worshiping God." The gatekeeper said, "No all day long you have been thinking about what could be going on in the prostitute's house, while all day long the prostitue was thinking of God. Even while looking at you, her mind was on God."