useLayout in init function