updated js and added more examples