added input functionality to CHECK script