update variables in MainHandler and Data class