Rewrited main system