more flexible way to calculate distance down the page