scripts to find the efficiency