update code and readme