Added the complete-square detector