output stack in correct order
add some useful functions
rewrite of command line user interface