main loop responsible for resizing detection now