set btn outside of if block