first version of submit function from web page results in matches being played