added centerToLayout option