to make the check function valid