added checkings for tags