Now supports N number of buttons