made some changes in the script logic