creates main2 and updates main and shelter