Hacked to get the right resistance