rect in main class