modified datacheck to take extra arg