Preparing for max/min function