changed x0 y0 adjustment