remove unused function Max()