added extend to check.js and added check-example.js file