Modifying simple example to use buttons