updating to recalculate offset on window resize