add "expand", "collapse" function & update example