added not equals case to select()