checking resistance