linux centering, moved logic to separate component