defined main state