change layout to be passed in as first arg