added multiple console.logs... and added check() function inside jquery input change