parse and main updated