add failure params & restruct code
fix readme