added buttons - caution this get stuck in an while(1) loop!