changed main initialization