refactor a bit
make height relative to window