m-script for task 2 added