change the format of context and the way to count the context length