changing resize function to set, not toggle, elements.