update readme and add javascript functionality