say more about layout algorithm