main system part