updated js and example files