finished but not tested, due to qt imcompatibility issues