pointer check line added