Added function to check result