rewrite the readme file, test and demo js code