add an idle timer that runs the check constantly. make private some functions.