changing UI and added globalvarialbes