added support for external up / down switch