add header comment
fix bug y=0 when maxWith is greater than max x