better input change detection