Added sanityCheck method