optimize the loops
update README document