new version - added gui, but it has not worked yet(((