Amended The Check Funcion