factoring offset top into calculation