created folders and started var
added var
fixed problem with var in if else and else if