implemented centering