Fixed a bug and created the script for execution.