supports window resize
update history