fixed some bugs and added slider in example