During the Sunday service Pastor (Mrs) Silvia Lia Leigh preached a sermon titled The Cross-over Miracle (5). Her text was taken from the Book of Joshua 2:1-24; 6:22-25, Heb 11:30, 31; James 2:24-26; Matt 1:1-6.


This is an amazing story of God’s grace with many lessons for us. The people of God are now at a place called Shittim (or Accacia Grove), on the east side of River Jordan. Moses died on the mountain. God commands Joshua to be the new leader of Israel. This is the last stop before the cross over. These are the last days of bondage. Across the River they see the Promised Land. Forty years previously, when Moses sent twelve spies to inspect the Promised Land, that simple action was followed by a terrible national sin. Because the whole nation rebelled against God they could not enter into the Promised Land. God sent them back into the wilderness. For the next forty years, all the adults 20 years and above died in there. When Moses sent the 12 spies it was in the presence of the whole nation. When they came back, ten of them gave an evil report about the land. They influenced the whole community to rebel against God. Only Joshua and Caleb trusted God and encouraged the people to enter. This time, the children of those people want to pass the test of obedience and faith to enter the Promised Land. They pledge total submission to Joshua, their new leader. They are now ready to enter into God’s Best for them. The people have learned from the mistakes of their parents and have repented of pride and unbelief. Their hearts now say: “Yes, Sir!” to God and to Joshua, their new leader.

From where they are, the highest structure they see ahead is the great city of Jericho. The meaning of the name ‘Jericho’ is ‘the City of the Moon’. All the people inside worshipped idols, especially the moon. Joshua sends two spies to Jericho. This mission is done secretly. Remember that Joshua was a seasoned spy himself. When Moses sent the 12 leaders, he told them to spy the land and the people. But none came close to the people of Canaan. Joshua clearly has learned from the mistakes of his master. He commands the two men to go and spy inside Jericho. This mission has a higher risk than what happened in the past. The two spies are not named. They are not leaders or famous people in the community. They seem young and physically strong, ready to take risks, to run or to hide. They go inside Jericho, and encounter Rahab, the harlot. She saved their lives. They bring a good report to Joshua himself. The community is not aware about this military action. You see that Joshua proves to be an excellent military leader. Confident that God gave them the land, he is ready for the cross-over.


The meaning of the name Rahab is ‘wide, large or big’. Maybe she was a huge woman with wide hips. We do not know. There is nothing in the natural that can commend her to us. But God used this woman of faith to save the two Israelite spies and facilitated the destruction of Jericho. What do we know about her?

*Rahab was a Canaanite. She was a citizen of the cursed city called Jericho. God told Israel to kill all the Canaanites and to posses their land. She was among the people God said that they should be killed (Josh 6:17-21). She was surely an idol worshipper. She was a liar and a deceiver.

*Rahab was a woman. In that ancient culture, the women were regarded as second-class citizens or the property of men.

*Rahab was a prostitute. If being a woman was considered inferior, being a prostitute is the lowest social status. In all cultures, prostitution was seen as sin, next to armed robbery. Men paid women to commit sexual sins. They used the bodies of prostitutes and cared nothing for their feelings. The only gain for the prostitutes is money. They had no respect, no reputation to lose, and no voice for men to listen to.  

You have to see Rahab with the eyes of the Spirit to understand her story. Her testimony of salvation is a story of grace. In spite of all these negative traits, Rahab became a woman of faith, a woman of God. The following are some good qualities hidden behind the sinful façade:

*Rahab was worldly wise. She was street smart. She was not foolish. As a prostitute, she was used to live among bad men and criminals. When she discovered that two Jewish men are in her house, and that the king of Jericho has heard about it, she lied about them and send the pursuers on the wrong track. She was fast in making decisions and willing to take risks to do what she wanted. She was ‘strong and courageous’ in her own way.  Jesus said: “Worldly people are more clever than spiritually-minded people when it comes to dealing with others… The people of this world look out for themselves better than the people who belong to the light (Lk 16:8, GWT, CEV). Like the dishonest manager, Rahab behaved wisely using the little resources at her disposal to make great gain. Thru a little lie, she saved the two spies, herself and her family. That does not mean that God approves of lies. To lie is sin. Rahab was a liar. She deceived her king’s men to go to the wrong direction, to save the two spies. Jesus said that ‘The devil is a liar’ (Jn 8:44). How can Rahab be a liar and a woman of faith at the same time? This is a reminder that we are all born sinners. Even after conversion, dying to sin is a process that takes a lifetime. Justification is a moment in time. But sanctification is a lifetime process.

*Rahab was discreet. Discretion means to be wise, diplomatic, prudent, especially in speech. It means to keep silent in order to avoid embarrassment or to gain an advantage. Maybe because of her job, Rahab knew how to keep a secret, how to hide men in an emergency. She was ‘wise as serpents’ (Matt 10:16), a quality Jesus expected from His servants, especially from missionaries who preach in dangerous places.

*Rahab had great courage. She hid the spies on the flat open roof under stalks of flax. From these plants, linen is made. It seems that her family lived outside the city and were farmers. They brought this flax to her house maybe thru her window. She dried them on the flat roof. She was smart to think of that as a good hiding place for the spies. But she was taking a great risk. If she was discovered that she was a traitor, the King of Jericho would kill her. She helped God’s servants under the nose of Satan. This is true faith and great courage!

*Rahab loved her family. She asked that Israel will have mercy not only on her, but on her parents and siblings. She took the risk to tell them about her decision to change camps and to serve the God of Israel. She convinced them to stay in her house. If any of her relatives betrayed her, she will be killed as a spy and a traitor.

*Rahab desired a new beginning, a better life. Prostitution is not an easy job. It is possible that she wanted to become a good woman but there was no hope for her in Jericho. God said that the Canaanites were wicked people. Just try to imagine that all her neighbors were armed robbers, pedophiles and criminals. There was no hope for her in Jericho. But Rahab wanted respect. She appreciated a good life. It is possible that this is the first time two men came to her brothel who were not interested in her body. They spoke to her respectfully, like she was a real human being. That impressed her. In Jericho, none greeted her, none spoke kindly to her. Men were ashamed to be seen with her in public. She knew the feeling of shame and rejection. But the Jewish spies saw her as God’s creation and spoke respectfully to her. This respect was a new thing to her. She appreciated it and she wanted more of it! She saw the God of Israel as the only One who can give hope to the hopeless. During the earthquake of Jericho, the only thing she had was the word of promise that she and her family will be saved. “You are my hiding place and my shield; I hope in Your word” (Ps 119:114). That word of promise was enough. She and her family were the only people from Jericho who survived its total destruction. Her house was built on the very wall that collapsed. But God kept that part of the wall intact. New beginnings are sweet but never easy. Like her daughter in law Ruth, Rahab was willing to let go of her people, neighbors, and friends, to become the citizen of another country. She became an immigrant and a foreigner before she became a Jewish woman by marriage. Rahab and her family experienced the cross-over miracle. Surely Rahab considered the two options: Jericho with its idols and the God of Israel, Jehovah. She meditated about the two sides of the battle. She discovered that she is on the wrong side of the game. She decided to change camps. She discovered in her heart that Jehovah God is unique, special, and worthy of her trust and praise. She feared God in the right way. She surrendered her life to God before the battle. Her faith in God saved her from sin and death! Praise the Lord!

*Rahab was a woman of faith! She believed God’s Word (Heb 11:31, James 2:24-26). She heard stories about Israel and their God. She heard that Jehovah is a mighty God who does miracles. He spilt the Red Sea for His people to cross over. She heard that they totally defeated their neighbors, the two kings on the east side of Jordan, and took their land. She believed that the God of Israel is greater than her idols. When the whole city became afraid of Israel, she decided not to fear but to find a way to make peace with this great God. Her life tells us that some of the Canaanites decided to surrender and become part of Israel. She is the first fruits, the first convert from the Promised Land. Rahab became a woman of faith in the only living God. In her speech she does not say ‘your God’. She addresses God as Jehovah, the covenant keeping God, the One who is faithful to His promises. In her heart, she rejected her idols. She did not know yet the symbol of the red cord hanging at her window. Even the people of Israel did not know the deep meaning of the Blood smeared on top of their doors. But they believed that the blood of the sacrificial lamb saves. Rahab took the risk to believe in the God of her enemies. That God saved her life! Selah!

*Rahab became the great grandmother of Jesus! She married a Jewish man called Salmon. The Jewish tradition says that he was one of the two spies. Thru marriage Rahab became a true Jewish woman. Their son was Boaz. Their grand son was King David. We see why Boaz was not worried about marrying Ruth, a Moabite. His own mother was a foreigner and a former prostitute, now a proselyte to Jehovah God. God’s ways are not our ways! Joseph who married Mary was from their lineage. Jesus is the descendant of Rahab, the sinner saved by grace (Matt 1:1-6).


Rahab speaks with full confidence in Jehovah God: “I know that the Lord has given you the land, that the terror of you has fallen on us, and that all the inhabitants of the land are fainthearted because of you. 10 For we have heard how the Lord dried up the water of the Red Sea for you when you came out of Egypt, and what you did to the two kings of the Amorites who were on the other side of the Jordan, Sihon and Og, whom you utterly destroyed. 11 And as soon as we heard these things, our hearts melted; neither did there remain any more courage in anyone because of you, for the Lord your God, He is God in heaven above and on earth beneath” (Joshua 2:9-11). Rahab speaks by faith. She sees things in the future as they have already happened. She tells them: “I know that the Lord has given you the land…” The people of Israel have not yet crossed over the Jordan, but Rahab has seen them as totally victorious. She knows that her people in Jericho will be defeated and destroyed. She recognized the paralyzing fear upon them as a sign of death. She knows that the source of this fear is Jehovah God. She confirms what Moses and the people of Israel prophesied forty years previously that all their enemies will melt in fear. “The people will hear and be afraid; Sorrow will take hold of the inhabitants of Philistia. Then the chiefs of Edom will be dismayed; The mighty men of Moab, trembling will take hold of them; All the inhabitants of Canaan will melt away. Fear and dread will fall on them; By the greatness of Your arm they will be as still as a stone, till Your people pass over, O Lord, till the people pass over whom You have purchased” (Ex 15:14-16).

The people in Jericho heard about the miracles Jehovah God did for His people. It is interesting to note that the same stories brought terror to the people of Jericho and faith and hope to Rahab. Rahab now believes that anyone who resists, or fight Jehovah God will lose the battle. Thru these stories her faith was born. By the time the spies came, she was ready spiritually to change camps. That is why she was so fast to help them. Faith was born in her heart before the spies came. The spies became her practical opportunity to escape darkness and go to the light. Rahab thought about her escape. She had no friends in Jericho to whom she can talk to about Jehovah. She kept her faith secret until the opportunity came.  Rahab had to quickly decide, to choose between serving her idols and the only living God. She made her choice. She abandoned her idols, betrayed her people in Jericho, and crossed over to Israel. This is how she became saved. Rahab made the best with the little knowledge she had about the only true God: that God is all powerful and the God is faithful to His covenant promises.    

The spies enter the city of Jericho. They go to the house of a harlot called Rahab. In Hebrew, the word ‘harlot’ is also translated as ‘housekeeper’.  Her house must have been a brothel. This is not the best place for two men of God to enter, but it is easier to hide in a place like that, where many foreign men come to drink, and to be sexually entertained by women. Drunkards talk more than usual. A brothel is bad for God fearing men, but it is good for the spies to hear the latest in the realm of politics. The spies made the decision to go there for two reasons: men could enter the brothel without too many problems, and they saw that her house was built on the wall. In case of danger, thru the window, they could exit faster. The two spies did a double work: they went to examine the city of Jericho and they also did evangelism. Rahab has never seen men who were not interested in her body, but only cared for her soul and her family. Their words and behavior surely convinced Rahab that Jehovah God is holy and real.


Rahab tells the Hebrew spies: “Now therefore, I beg you, swear to me by the Lord, since I have shown you kindness, that you also will show kindness to my father’s house, and give me a true token,

and spare my father, my mother, my brothers, my sisters, and all that they have, and deliver our lives from death” (Joshua 2:12, 13).

Rahab asked the spies for ‘a true token’. In Hebrew these words are translated as a pledge of truth, a sure, a real, and reliable sign, evidence, a guarantee of your faithfulness, some proof of your sincerity. She is asking for something visible, to hold in her hand as evidence that their promise to her done in secret will come true later. She did not accept the simple word of promise of the spies. She had a practical faith. She was afraid that in the confusion of Jericho’s destruction, without a visible proof of their pledge, she and her family will be killed with the others. As you can see, her faith in Jehovah God was both theological and practical. This is true faith! She believed in God and also in the blood of Jesus. That scarlet red rope was the visible symbol of the Blood of Jesus shed for her on Calvary tree.

She shows kindness to the two Jewish men. She saved their lives. She trusts Jehovah great covenant promise made to Abraham: “I will bless those who bless you, And I will curse him who curses you; And in you all the families of the earth shall be blessed” (Gen 12:3). The men made a pledge before God: ‘Our lives for yours’. They made a vow that if they do not rescue Rahab from the destruction of Jericho, then God should judge them as guilty and kill them. She helped them in their mission as spies by telling them the truth about the citizens of Jericho. In exchange for this kindness to them, she wants them to promise to save her and her entire family from the coming destruction of Jericho.

For Rahab to be saved she had to do three things: To bind the red cord by her window, to bring all her family inside her house and to keep silent about this encounter. If she tells the king about them, if she betrays them, they are not bound to save her. When the King of Jericho sent messengers to Rahab to find about the spies, the men were not aware of the danger. It was Rahab herself that decided to hide them. That is when they knew that their life is in danger. Rahab could have betrayed the spies any time. But she did not! She changed camps and trusted Jehovah God. That was great faith and wisdom! The Bible does not openly condemn her for the lying but approves of her faith.

Rahab insisted that her family be saved with her. It seems that she had no husband or children. She only asks for a proof that they promised life to her and to her household. Her wish came true. This is the cross-over miracle of a whole family, from paganism to serving the only living God. In fact, God gave her more than she asked. She became a princess in Israel, married Salmon, a leader from the tribe of Judah. King David, and later Jesus Christ, are among her descendants. “Now to Him who is able to do exceedingly abundantly above all that we ask or think, according to the power that works in us, to Him be glory in the church by Christ Jesus to all generations, forever and ever. Amen” (Eph 3:20, 21)

Rahab is a woman desperate to save her soul and her family. She sees the two men as her ticket to salvation. “Unless, when we come into the land, you bind this line of scarlet cord in the window through which you let us down, and unless you bring your father, your mother, your brothers, and all your father’s household to your own home” (Josh 2:18). The spies command her ‘to bind the scarlet cord in the window’. She was not to be careless with that cord. In Hebrew, the word ‘cord’ also means a door of hope, of expectancy and longing for better things. A proof that Rahab had saving faith is that she desired that her family should be saved. Her love for her family may have been natural, but once she trusted God for her salvation, she wanted others to be saved.

Rahab had to tie the scarlet cord. She had no pastor to call, no church to help her with prayer. Her personal faith and works were enough to save her and her family. Morning and evening she made sure that the cord was there. Salvation is by the blood of Jesus alone! She knew that her hope was in that scarlet cord. She did not use super-glue to connect the cord to the window. She had to tie it strongly so that the wind will not carry it away. That cord was the most important item in the house. She could lose all her money and clothes, but not that cord! This red cord protects her soul, her life, and her family! Rahab had a faith that manifested thru action (Jam 2:24-25). This is real faith! She did not allow her past to define her future! She loved her family! It is hard for us to believe that a prostitute loves people! But here we see that it is possible!

Lesson: The scarlet cord protected Rahab and her family. Fight to save your family!!! Rahab could have asked for money or land. But she did not. Here you see that she is free from the spirit of prostitution! All she asked for was that her family will live! Your family can be saved no matter your sinful background. It is because of the Blood of Jesus. There is now no condemnation for them who are born again! “Believe on the Lord Jesus Christ, and you will be saved, you and your household” (Ac 16:31).

Why do you think God led Joshua to send the two sipes to Jericho? It is true that they bought some information. But the main reason why they went there, it was to save some of God’s lost sheep living in Jericho. They went there as missionaries and saviors. Rahab’s name and her family was written in the Lamb’s Book of life before the foundation of the world. Jesus said: “What man of you, having a hundred sheep, if he loses one of them, does not leave the ninety-nine in the wilderness, and go after the one which is lost until he finds it? And when he has found it, he lays it on his shoulders, rejoicing. And when he comes home, he calls together his friends and neighbors, saying to them, ‘Rejoice with me, for I have found my sheep which was lost!” (Lk 15:4-6). The salvation of Rahab and her family brought joy to Israel. Glory to God!

Rahab’s confession of faith in Jehovah was as powerful as Peter’s own. “Jesus to them, “But who do you say that I am?” Simon Peter answered and said, “You are the Christ, the Son of the living God.” Jesus answered and said to him, “Blessed are you, Simon Bar-Jonah, for flesh and blood has not revealed this to you, but My Father who is in heaven. And I also say to you that you are Peter, and on this rock I will build My church, and the gates of Hades shall not prevail against it” (Matt 16:15-18). As it was with Peter, Rahab’s revelation of who Jehovah God is, was given by God the Father Himself. She had no synagogue or church in Jericho to attend. God revealed Himself to her thru the stories of His mighty deeds for Israel. She has been a silent believer even before the spies came to her house. She was ready to make a commitment and the spies provided the opportunity. It was to them that she openly confessed God! She is now a child of God! “With the heart one believes unto righteousness, and with the mouth confession is made unto salvation” (Rom 10:10)

The scarlet cord tied at her window was the sign that her house, a prostitute brothel, was safe under the Blood of Jesus. The scarlet rope tied at the window represented faith for salvation thru the Blood of Jesus. This salvation is by grace alone. To bind the rope on the window is so easy. Even a child can do that. Because Christ paid it all, salvation by grace is easy for the believer. Even a child can believe in Jesus. The scarlet rope is a visible symbol of an internal miracle of faith. Rahab could not trust herself for salvation. She was a sinner. She had nothing to offer to God except her faith in Christ Crucified who died to save her soul. Rahab was like the woman at the well (John 4). By telling her family to trust in Jesus too, she did the work of an evangelist or a pastor. This is great ministry. Long ago, when Lot talked to his two sons in law that God wants to destroy Sodom and that they should escape with his family, the two men mocked Lot (Gen 19:14). They did not believe the Gospel. They perished with the other people in Sodom.  But Rahab’s family believed in her God! They were all saved!


God is sovereign. His Grace is sovereign. God can change and use any man or woman, for His glory. God takes pleasure to change the foolish and the weak, and the ones rejected by the society. In their conversion, God alone is glorified. God alone grants a new beginning to any person. No matter how much you have sinned, come to the Cross, trust in Jesus, and God will save your soul. God is not like us. We are ashamed to talk to sinners, to thieves or prostitutes. This is because we are afraid to lose our reputation. But Jesus has no inferiority complex. He was never afraid to lose his reputation. Perfect love drives out all fears (1Jn 4:18). Jesus said that He came to die for sinners, not for righteous religious men. Rahab’s story proves that even in the Old Testament, salvation was always by Grace and through Faith. “For by grace you have been saved through faith, and that not of yourselves; it is the gift of God, not of works, lest anyone should boast. For we are His workmanship, created in Christ Jesus for good works, which God prepared beforehand that we should walk in them” (Eph 2:8-10). God is the God of all who believe, no matter their past sin. Jesus rebuked the religious men of His day (people like the King and the rulers of Jericho): “Assuredly, I say to you that tax collectors and harlots enter the kingdom of God before you. For John came to you in the way of righteousness, and you did not believe him; but tax collectors and harlots believed him; and when you saw it, you did not afterward relent and believe him” (Matt 21:31, 32).

It’s important to remember that not every passage in the Bible is telling us what to do. Not every character is an example for us to follow in every action they take, even if some parts of what they do are admirable. God’s Word does not advices us to commit prostitution, adultery, to lie or to deceive people. God is holy, He hates sin! But we see that Rahab is a testimony of God’s grace. “Where sin was powerful, God’s gift of undeserved grace was even more powerful” (Rom 5:20, CEV). Rahab, by her very profession, is a morally complex character. And yet, God was willing to let her become a hero in this story, the story of a sinner saved by grace, to the glory of God!

God appreciates and rewards faith in Him (Heb 11:6). Rahab believed not only that Jehovah God is strong and He does miracles. She also believed that He is the only faithful God who keeps His covenant promises with His people. She lied but she believed that God does not lie! “God is not a man, that He should lie, Nor a son of man, that He should repent. Has He said, and will He not do? Or has He spoken, and will He not make it good?” (Nu 23:19). The spies tell her that the very red cord that she used to save them, will be the true token and evidence to save her life. She bound the red cord by her window. Lesson: the very thing we use to serve God will be used by God to bless us!

Rahab conversion from a harlot to a worshipper is similar with the sinful woman who met Jesus. The religious men rejected her, but Jesus accepted her worship and confirmed her conversion. Her faith manifested as worshipping Jesus freely, in public. Then Jesus said to the woman, “Your faith has saved you. Go in peace” (Lk 7:50). That good word can apply to Rahab also!

Rahab had faith. When Rahab ‘welcomed’ the two spies, at that time, in the natural, there was no hope at all that Israel can defeat Jericho. Israel had no artillery or bombs to bombard the high wall. But Rahab believed that they could win the battle, just because Jehovah is their God. Listen to what she told the two men: “I know that the Lord has given you the land… for the Lord your God, He is God in heaven above and on earth beneath” (Josh 2:9,11). This is 100% faith!

“By faith the harlot Rahab did not perish with those who did not believe, when she had received the spies with peace” (Heb 11:31). The word ‘faith’ means to trust God completely. The word ‘receive’ means to welcome, or to accept the spies in her home. The word ‘peace’ means good will and prosperity. The people of Jericho did not believe that God will destroy their great city. They were rebels and disobedient. They chose to fight God and His people. Rahab was wiser. She knew now that no one fights God and wins.

Lesson: it does not matter if you are strong or rich in the natural. The victory is decided by your God! As for God’s people, they move from victory to victory in Christ! God can never lose any battle! Be sure you are on God’s side!

Wisdom does spiritual warfare. Christ has become our wisdom from God (1 Cor 1:30). The people of Jericho trusted in the strength of their city wall. That was their idol. They thought that their wall was stronger than Jehovah God. That is foolishness. “A wise man scales the city [walls] of the mighty And brings down the stronghold in which they trust” (PV 21:22; AMP). Rahab was wise. Her faith and wisdom made her spiritually strong. “Wisdom strengthens the wise man more than ten rulers who are in a city” (Ecc 7:19).

Question: does God have the right to judge sinners and send them to hell? The answer is categorically ‘yes’! God is sovereign! God has created everything that is created. He has to right to judge and condemn all people. God sent His only begotten to save only those who believe in Him!

Lesson: pray that God increases your wisdom and your faith. You will have spiritual strength, the true mark of a champion, a conqueror.

Joshua and Rahab are the two main characters in this chapter. In the natural, they are completely opposite. He is a man, a Jew, Moses’ successor, a worshipper of Jehovah, and the leader of the army that will destroy Jericho. Rahab was a woman, a prostitute, an idolater, from the cursed race of the Canaanites, and living in the city that will be destroyed. The only thing these two people have in common is their faith in Jehovah God. We forget the differences and remember only the glorious story of salvation, when Jew and Gentile become one on Christ. This unity is possible in Christ alone. This is the power of the Gospel: Christ died and rose again to save those who believe! “For I am not ashamed of the gospel of Christ, for it is the power of God to salvation for everyone who believes, for the Jew first and also for the Greek” (Rom 1:16). “There is neither Jew nor Greek, there is neither slave nor free, there is neither male nor female; for you are all one in Christ Jesus” (Gal 3:28).

Lesson: It does not matter how you start in life; it matters how you end! You must become born again and be saved, in Christ alone!

God is sovereign in His choice of people to be saved. It does not matter if they are sinful or low class like Rahab. Jesus died for all who believe. The humble believe Him but the proud reject His offer of grace. God saves the foolish to shame the worldly wise. He saves the weak to shame and nullify those who think are strong in this world (1 Cor 1:26-31). This is the royal way of the Cross. Why does God do that? So that none may boast in His presence, for all the glory belongs to God alone!


Encouraged by the words of Rahab, when the two spies went back to Joshua, they confidently told him that God has granted them the victory. Their report was of total faith in God. How different this report was from the one brought by the ten spies 40 years ago. They brought grapes from the land, but these two, by faith, brought souls from Canaan! This is a sample of God’s Best for you! Glory to God! The miracle of Cross-over is about to begin… Worship the Lord!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s