recode to have gui interface with pyqt.

basically is a mess right now.
Will recode in the future