works now but only after touching a button

works now but only after touching a button