implement center x and y