adding p.main class