fix passing params into layout fn, test