Add better resistance calculation