checking redeclarations