main system(unfinished)