ne logic

resolves #639