main script begining