added a CheckButton function to use the defines