make it work on windows; extend gui example