syntax bugs fixed + major changes in check()
 Working code for all test cases except large
Working code for all benchmarks without async