much more stable version with updated gui