updated to resize