separate out calculation of frameoffset from x,y