Added square switch control