I'd suggest adding brackets around these if statements now, just because the connect() one spans multiple lines (although still only one statement)