get this code to work on windows 8, it has not been used for a long time