updated to get the flow and layouts correct
fixed test