finally finished whiteboxing the script