delay function added with window resize logic kinda