use hook for layout