check.h modified; removed infinite loop error and arguement to compare changed