connected main frame and the corresponding gui