add checking functions