changed inspect logic