try catch for bad graphics cards
slight refactor
slight refactor