resize window gracefully
remove debug