reorganized classess and clreated a Conroller Class