adding resistence utility function