created write_statement function,  and modify match to suppress parenthesis from the parsed list