add retransfer logic not fully tested