added toggle code from wilberforce