Token type changes and function to handle with it