replaced main with parser