work on gui, use of global variables for views