refactor to match .getBoundingClientRect()
refactor