finish offline handing, needs testing