implemented proper tokenizing