updated for auto layout.