todo automatic window resize

done: selection tool