program works with buttons