style
now using priority queue in slider example. also kept in stack/queue
implementation just for comparison