Updated the script for problem 28