A question for electricians
I was putting a new light switch in my house and I have found things in other places that are not like they should be and I wonder if this switch is correct. It had the 2 white wires tied together and the 2 black ones wired to the switch with the ground screwed to the box. I installed the new one the same but should it be different? I have not turned on the power yet, I need to hang a new light and they did not use a box for the old light but I installed one but now I need to do some sheetrock work before I install the light. It is a singular switch, not a 3 way.