update with a nice interface for the example

updated the example with a nicer user interface