Wrote function to check for pass