old version but now with a GUI