added checkmark logic