Adding debounced resize function