remove unused method getExtremes