add check for empty tokens