Add tophat check code