window now seperated from main class