simplify calculate_token_grant_types method