Quick Implementation of mainwindow.cpp