consolidate resize handlers