changed button to checkbox, added polling