We removed an old ceiling fan. In the ceiling box, we have 3 white wires and 3 black wires. The room has only one light switch, but in the hallway, there is a light switch that operates the hallway light. We have tried different combinations. But what happens most of the time is that the light comes on but won't switch off or the hallway light won't work. We have identified the power wire (black) in the ceiling.