variables names changed, now all are either H for Height of W for Width