changed while by for..downto
little changes and comments before trying to build more than 1 class