adding type attr