creating folders, fixing alg1