adding some opacity and type comparison