He was thinking hard. After that he had a dream. In the dream he saw an angel, God sent it to him. The angel said to him, “Joseph! you are from David's mob! Listen! Don't be upset about the woman Mary. God's Spirit gave her the child. Therefore you can (OR will OR should) take her as your wife.