script for main task 3.