written with Qt