I am having trouble replacing a wall receptacle that is controlled by a switch. The old receptacle box had a three way wire (red, black and white) and a two way wire. I assume the three way is coming from the switch and the two way is going to another receptacle. I can get power to the receptacle if I connect both black wires to one side and the red wire and two white wires to the otehr side. However, the switch will not work. If I connect the red wire to the same side as teh receptavle as the balck wires, there is no power. I now the switch is capable of working as I have tested it (note I did not make any changes to the switch or its connections) so I must be doing something wrong with the wiring. Can you help?