reworked ball.pl to use tokenizer