added max x and y dimensions