max X to console

trying to write the max x value to the console