Worked on recenter function