learn from sharejs api