changed Tokenizer to implment Serializable