added ui buttons and prepared for state change z-index