fixed import and removed unused if