finished re tran func